Integrand size = 25, antiderivative size = 36 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {a \text {arctanh}(\cos (c+d x))}{d}+\frac {a \sec (c+d x)}{d}+\frac {b \tan (c+d x)}{d} \]
Time = 0.02 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.56 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {a \sec (c+d x)}{d}+\frac {b \tan (c+d x)}{d} \]
-((a*Log[Cos[(c + d*x)/2]])/d) + (a*Log[Sin[(c + d*x)/2]])/d + (a*Sec[c + d*x])/d + (b*Tan[c + d*x])/d
Time = 0.33 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.92, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.360, Rules used = {3042, 3317, 3042, 3102, 25, 262, 219, 4254, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+b \sin (c+d x)}{\sin (c+d x) \cos (c+d x)^2}dx\) |
\(\Big \downarrow \) 3317 |
\(\displaystyle a \int \csc (c+d x) \sec ^2(c+d x)dx+b \int \sec ^2(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \csc (c+d x) \sec (c+d x)^2dx+b \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 3102 |
\(\displaystyle \frac {a \int -\frac {\sec ^2(c+d x)}{1-\sec ^2(c+d x)}d\sec (c+d x)}{d}+b \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle b \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {a \int \frac {\sec ^2(c+d x)}{1-\sec ^2(c+d x)}d\sec (c+d x)}{d}\) |
\(\Big \downarrow \) 262 |
\(\displaystyle \frac {a \left (\sec (c+d x)-\int \frac {1}{1-\sec ^2(c+d x)}d\sec (c+d x)\right )}{d}+b \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 219 |
\(\displaystyle b \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx+\frac {a (\sec (c+d x)-\text {arctanh}(\sec (c+d x)))}{d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {a (\sec (c+d x)-\text {arctanh}(\sec (c+d x)))}{d}-\frac {b \int 1d(-\tan (c+d x))}{d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {a (\sec (c+d x)-\text {arctanh}(\sec (c+d x)))}{d}+\frac {b \tan (c+d x)}{d}\) |
3.15.47.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) ^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ (b*(m + 2*p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b , c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c , 2, m, p, x]
Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_S ymbol] :> Simp[1/(f*a^n) Subst[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/ 2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1 )/2] && !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a Int[(g*Co s[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d Int[(g*Cos[e + f*x])^ p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Time = 0.62 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.14
method | result | size |
derivativedivides | \(\frac {a \left (\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+b \tan \left (d x +c \right )}{d}\) | \(41\) |
default | \(\frac {a \left (\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+b \tan \left (d x +c \right )}{d}\) | \(41\) |
parallelrisch | \(\frac {a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 a}{d \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}\) | \(61\) |
risch | \(\frac {2 i \left (-i a \,{\mathrm e}^{i \left (d x +c \right )}+b \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}\) | \(71\) |
norman | \(\frac {-\frac {2 a}{d}-\frac {2 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(104\) |
Time = 0.27 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.81 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {a \cos \left (d x + c\right ) \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - a \cos \left (d x + c\right ) \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, b \sin \left (d x + c\right ) - 2 \, a}{2 \, d \cos \left (d x + c\right )} \]
-1/2*(a*cos(d*x + c)*log(1/2*cos(d*x + c) + 1/2) - a*cos(d*x + c)*log(-1/2 *cos(d*x + c) + 1/2) - 2*b*sin(d*x + c) - 2*a)/(d*cos(d*x + c))
\[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx=\int \left (a + b \sin {\left (c + d x \right )}\right ) \csc {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx \]
Time = 0.20 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.33 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx=\frac {a {\left (\frac {2}{\cos \left (d x + c\right )} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + 2 \, b \tan \left (d x + c\right )}{2 \, d} \]
1/2*(a*(2/cos(d*x + c) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)) + 2*b*tan(d*x + c))/d
Time = 0.39 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.33 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx=\frac {a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {2 \, {\left (b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1}}{d} \]
(a*log(abs(tan(1/2*d*x + 1/2*c))) - 2*(b*tan(1/2*d*x + 1/2*c) + a)/(tan(1/ 2*d*x + 1/2*c)^2 - 1))/d
Time = 11.01 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.44 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx=\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {2\,a+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]